<?php

/**
 * @Author:             wuchenge
 * @Date:               2025-03-11 17:59:09
 * @Last Modified by:   wuchenge
 */
Route::middleware([
    'adminAuth',
])
    ->group(function () {
        // 会员列表
        Route::get('/user/list', 'UserController@list')->name('user.list');

        // 等级列表
        Route::get('/level/list', 'LevelController@list')->name('level.list');
        Route::get('/level/all', 'LevelController@all')->name('level.all');

        // 等级添加
        Route::post('/level/create', 'LevelController@create')
            ->name('level.create');

        // 等级修改
        Route::post('/level/update/{id}', 'LevelController@update')
            ->name('level.update')->where('id', '[0-9]+');

        // 等级详情
        Route::get('/level/detail', 'LevelController@detail')
            ->name('level.detail');

        // 改变会员等级
        Route::post('/user/changeLevel', 'UserController@changeLevel')
            ->name('user.changeLevel');

        // 改变会员状态
        Route::post('/user/changeStatus', 'UserController@changeStatus')
            ->name('user.changeStatus');

        // 添加消费记录
        Route::post('/user/record/create', 'UserController@addRecord')
            ->name('user.record.create');

        // 用户消费记录列表
        Route::get('/user/record/list/{id}', 'UserController@recordList')
            ->name('user.record.list')->where('id', '[0-9]+');
    });
